﻿@using Mvc4WebApiKoTb.Helpers
@model Mvc4WebApiKoTb.Models.LoginModel
@{
    ViewBag.Title = "Log in";
}

<div class="span3">
    &nbsp;
</div>

<div class="span6">
    <div class="well page-header">
        <h1>@ViewBag.Title</h1>
    </div>

    @using (Html.BeginForm("Login", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal" }))
    {
        <fieldset>
            @* Unseren eigenen Validation Summary anzeigen, damit dieser auch in die Twitter Api passt. *@
            @Html.ValidationSummary("Log in was unsuccessful. Please correct the errors and try again.")
            <div class="control-group">
                @Html.LabelFor(m => m.UserName, new { @class = "control-label" })
                <div class="controls">
                    @Html.TextBoxFor(m => m.UserName)
                </div>
            </div>

            <div class="control-group">
                @Html.LabelFor(m => m.Password, new { @class = "control-label" })
                <div class="controls">
                    @Html.PasswordFor(m => m.Password)
                </div>
            </div>

            <div class="control-group">
                @Html.LabelFor(m => m.RememberMe, new { @class = "control-label" })
                <div class="controls">
                    @Html.CheckBoxFor(m => m.RememberMe)
                </div>
            </div>
            <div class="form-actions">
                <input class="btn btn-primary" type="submit" value="Log in" />
                <div class="pull-right">
                    @Html.ActionLink("Create Account", "Register", null, new { @class = "btn" })
                </div>
            </div>
        </fieldset>
    }
</div>
<div class="span3">
    &nbsp;
</div>
@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
